package cc.ccoke.swingutils.phone_number.filter;

import javax.swing.filechooser.FileFilter;
import java.io.File;

public class FileEndFilter extends FileFilter {
    @Override
    public boolean accept(File file) {
        String name = file.getName();
        return file.isDirectory() || name.toLowerCase().endsWith(".xls") || name.toLowerCase().endsWith(".xlsx");
    }

    @Override
    public String getDescription() {
        return "*.xls;*.xlsx";
    }
}
